#!/bin/sh
#
# 'start' - Shell script a la RedHat initialization routines


if [ "$1" = "" ]
then 
BASE=/applications/assp;
else
BASE=$1;
fi
export BASE
echo Starting ASSP Anti-SPAM Proxy server in $BASE
password=$BASE/password.txt
trap '' 1
LANG=
export LANG
echo `cat $password` | sudo -S perl $BASE/assp.pl $BASE
pidfile=$BASE/pid

if [ `cat $pidfile`  ]
	then 
	echo -e "\n"
	echo ASSP is running with PID `cat $pidfile`
fi